﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Menu.aspx.cs"
    Inherits="DokuzEylul.Sinav.WebForm3" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="insertheader">
        <asp:label ID="lblheader" runat="server" Text="Menu & Uygulama Ekleme Paneli"></asp:label>
    </div>
    <div style="padding:5px; border:solid 1px darkgray; width:100%; background-color:#D7E6F4;">
    <asp:Panel ID="pnlcontent" runat="server" Enabled="false">    
        <table>
             <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Menu ID"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMenuId" Width="150px" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtMenuId" ErrorMessage="*" ValidationGroup="menu"></asp:RequiredFieldValidator>
                </td>
            </tr>
             <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="Menu Title"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMenuTitle" Width="150px" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                        ControlToValidate="txtMenuTitle" runat="server" ErrorMessage="*" 
                        ValidationGroup="menu"></asp:RequiredFieldValidator>
                </td>
            </tr>
             <tr>
                <td>
                     <asp:Label ID="Label3" runat="server" Text="Menu Parent ID"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlParentID" runat="server" Width="150px" DataValueField="MenuId"  DataTextField="MenuTitle">
                    </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
             <tr>
                <td>
                     <asp:Label ID="Label4" runat="server" Text="Menu Type"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlMenuType" Width="150px" runat="server">
                        <asp:ListItem Text="Menu" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Site" Value="1"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                </td>
            </tr>
             <tr>
                <td>
                     <asp:Label ID="Label5" runat="server" Text="Url"></asp:Label>
                </td>
                <td>
                     <asp:TextBox ID="txtUrl" Width="150px" runat="server"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
        </table>
    </asp:Panel>
    </div>
    <div>
        <asp:Button ID="btnYeni" runat="server" Width="100px" Text="Yeni" 
            onclick="btnYeni_Click" />&nbsp;
    <asp:Button ID="btnKaydet" runat="server" Width="100px" Text="Kaydet" onclick="btnKaydet_Click" 
            ValidationGroup="menu" />&nbsp;
        <asp:Button ID="btnSil" runat="server" Width="100px" Text="Sil" 
            OnClientClick="return confirm('Silmek istediğinize emin misiniz?');" 
            onclick="btnSil_Click"/>&nbsp;
    </div>
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
         AllowPaging="True" AllowSorting="True" Width="100%" CssClass="gridview" 
         AlternatingRowStyle-CssClass="even" DataKeyNames="MenuId" GridLines="None" 
            ondatabinding="GridView1_DataBinding" 
            onselectedindexchanged="GridView1_SelectedIndexChanged">
         <Columns>
            
             <asp:CommandField HeaderText="Seç" ShowSelectButton="True" />
            
            <asp:BoundField DataField="MenuId" HeaderText="Menu ID" />
            <asp:BoundField DataField="MenuTitle" HeaderText="Title" />
            <asp:BoundField DataField="MenuParentId" HeaderText="Parent ID" />
            <asp:BoundField DataField="MenuType" HeaderText="Type" />
            <asp:BoundField DataField="MenuUrl" HeaderText="Url" />
            
         </Columns>
         
<AlternatingRowStyle CssClass="even"></AlternatingRowStyle>
         
        </asp:GridView>
    </div>
</asp:Content>
